package ooday04;

import java.util.Timer;
import java.util.TimerTask;

import ooday01.Student;

//匿名内部类的演示----定时器
public class TimerDemo {

    public static void main(String[] args) {

        Timer timer = new Timer();
        int interval = 1000;

        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("啦啦啦啦啦啦啦");
            }
        }, interval, interval);
        Student student = new Student();















       /*
        Timer timer = new Timer();//定时器对象
        int interval = 2000;//定时间隔
        timer.schedule(new TimerTask() {
            @Override
            public void run() {//定时干的事----每10000毫秒自动执行
                System.out.println("啦啦啦啦啦啦");
            }
        }, interval,interval);//定时计划表*/


    }
}



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































